package cn.lyd.org.domain;

import cn.lyd.base.domain.BaseDomain;
import cn.lyd.system.domain.Role;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.sun.org.apache.bcel.internal.generic.NEW;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotBlank;
import java.util.ArrayList;
import java.util.List;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class Employee extends BaseDomain {

    //员工姓名
    @NotBlank   //判断字符串是否为空
    private String username;

    //员工电话
    @NotBlank   //判断字符串是否为空
    private String phone;

    //邮箱
    @NotBlank   //判断字符串是否为空
    private String email;

    //盐值
    private String salt;

    //密码
    @NotBlank   //判断字符串是否为空
    private String password;

    //年龄
    private Integer age;

    //状态
    private Integer state; //0：禁用 1：启用

    //所属部门id
    private Long department_id;

    //登录信息id
    private Long logininfo_id;

    //店铺id
    private Long shop_id;

    //保存所属店铺的信息
    private Shop shop;

    //保存上级部门的信息-包括名称
    private Department parent;

    //用于封装当前部门的子部门
    //部门树最后一级没有数据就不显示
    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    private List<Department> children = new ArrayList<>();

    //二次确认密码
    @NotBlank   //判断字符串是否为空
    private String comfirmPassword;


    //保存前端传来的角色id数组
    private List<Long> role_idList;



}
